package com.pzhyd.sc.dao.inter;

import java.io.Serializable;
import java.util.List;

import com.pzhyd.sc.util.Page;

public interface IBaseDao {

	/**
	 * 分布查询
	 */
	public void searchHql(String hql, List parms, Page page) throws Exception;
	
	/**
	 * 分布查询
	 */
	public List searchHql(String hql, List parms) throws Exception;

	/**
	 * 根据主键查询对象
	 */
	public Object searchById(Class clz, Serializable id) throws Exception;

	/**
	 * 查询总数
	 */
	public int getTotalCount(String hql, List param) throws Exception;

	/**
	 * 添加数据
	 */
	public int insert(Object obj);

	/**
	 * 删除数据
	 */
	public int delete(Object obj) throws Exception;

	/**
	 * 根据主键删除
	 */
	public int deleteById(Class clz, Serializable id) throws Exception;

	/**
	 * 修改对象
	 */
	public int update(Object obj) throws Exception;

	/**
	 * 用Hql语句操作数据
	 */
	public int operateHql(String hql, List params) throws Exception;
}